<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page language="java" import="com.jxLC.Action.*"%>
<%@ page language="java" import="com.jxLC.Model.*" %>
<%@ page language="java" import="com.jxLC.Service.*" %>
<%@include file="/checkuLoginSession.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
FilesService filesService=new FilesService();
List<Files> files=filesService.getfile();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户上传文件</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
     <form action="userUploadAction" enctype="multipart/form-data" method="post" onsubmit="return checkForm();">
      
             所属类别<select name="CFile_id">
                  <option value="0">请选择</option>
                 <%
                 for(Files f : files){
                 %>
                  <option value="<%=f.getCFile_id() %>"><%=f.getCFile_topic() %></option>
                  <%
                  }
                  %>
             </select>
      <s:textfield name="CFC_topic">文件主题</s:textfield>
      <s:textfield name="CFC_author">文件作者</s:textfield>
      <s:textfield name="CFC_time">上传日期</s:textfield>
      <s:file name="upload" label="选择文件"/>
      <s:fielderror name="error"/>
      <s:submit value="上传" onclick="return validate();"/>
  </form>  
 <s:fielderror />
  </body>
</html>
